home *** CD-ROM | disk | FTP | other *** search
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
- * |_o_o|\\ Copyright (c) 1989 The Software Distillery. *
- * |. o.| || All Rights Reserved *
- * | . | || Written by John Toebes and Doug Walker *
- * | o | || The Software Distillery *
- * | . |// 235 Trillingham Lane *
- * ====== Cary, NC 27513 *
- * BBS:(919)-471-6436 *
- \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- #include "pickpack.h"
- #include "struct.h"
- #include "lockgen.h"
-
- static struct IntuiText IText =
- {
- 1,0,JAM2, /* front and back text pens, drawmode and fill byte */
- 0,0, /* XY origin relative to container TopLeft */
- &TOPAZ80, /* font pointer or NULL for default */
- NULL, /* pointer to text */
- NULL /* next IntuiText structure */
- };
-
- static struct IntuiText NameText = {
- 3,0,JAM2, /* front and back text pens, drawmode and fill byte */
- 0,0, /* XY origin relative to container TopLeft */
- &TOPAZ80, /* font pointer or NULL for default */
- NULL, /* pointer to text */
- NULL /* next IntuiText structure */
- };
-
- void stlocknew(nw, it, stnode)
- struct NewWindow **nw;
- struct IntuiText **it;
- struct STNODE *stnode;
- {
- *nw = &NewWindowStructure1;
- *it = NULL;
- return;
- }
-
- /* Display the struct */
- int stlockdisp(n)
- struct STNODE *n;
- {
- char data[100];
- struct FileLock *lock;
- char *p;
-
- INITTEXT(14)
- BUG(1,("stlockdisp: Entry, stnode 0x%08x window 0x%08x\n", n, n->w))
- NameText.IText = (UBYTE *)data;
-
- lock = n->d.lock;
-
- sprintf(data, " Basename: %s", n->oname);
- SHOWNAME
-
- sprintf(data, " fl_Link: %08lx (Next Lock)", lock->fl_Link);
- SHOWTEXT
-
- sprintf(data, " fl_Key: %08lx (Disk Block)", lock->fl_Key);
- SHOWTEXT
-
- switch(lock->fl_Access)
- {
- case SHARED_LOCK: p = "(SHARED_LOCK/READ) "; break;
- case EXCLUSIVE_LOCK: p = "(EXCLUSIVE_LOCK/WRITE)"; break;
- default: p = "(Unknown Access) "; break;
- }
- sprintf(data, "fl_Access: %08lx %s", lock->fl_Access, p);
- SHOWTEXT
-
- sprintf(data, " fl_Task: %08lx (Handler Process)", lock->fl_Task);
- SHOWTEXT
-
- sprintf(data, "fl_Volume: %08lx (Volume entry)", lock->fl_Volume);
- SHOWTEXT
-
- BUG(1, ("stlockdisp: Exit\n"))
- return(RC_OK);
- }
-